import time
from selenium import webdriver
from selenium.webdriver.common.by import By
import os

options = webdriver.ChromeOptions()
dlpath = os.path.join(os.path.dirname(os.path.abspath(__file__)),'DOWNLOD')
# print(dlpath)
prefs = {
    'profile.default_content_settings.popups': 0,
    'download.default_directory': dlpath,
    'safebrowsing.enabled':True
}
options.add_experimental_option('prefs',prefs)
driver=webdriver.Chrome(options = options)
driver.get(' https://pc.weixin.qq.com')
time.sleep(2)
driver.find_element(By.ID,'downloadButton').click()
time.sleep(100)